import request from '@/utils/request'

/**根据租户ID获取租户名称 */
export function getDistrNameById(params) {
  return request({
    url: '/distribution/distributorApply/getDistrNameById',
    params
  })
}


/**发送邮箱验证码*/
export function sendEmail(email) {
  return request({
    url: `/distribution/distributorApply/sendEmail?email=${email}`,
  })
}

/**验证邮箱验证码*/
export function checkEmailCode(email, code) {
  return request({
    url: `/distribution/distributorApply/checkEmailCode?email=${email}&code=${code}`,
  })
}


/**校验商家名称是否存在 */
export function checkMerchantName(params) {
  return request({
    url: '/distribution/distributorApply/checkMerchantName',
    params
  })
}

/**提交注册 */
export function submitRegister(data) {
  return request({
    url: '/distribution/distributorApply/submitRegister',
    method: 'post',
    data
  })
}



